placessidebar: Point to row instead or reparenting popovers
authorAntónio Fernandes <antoniof@gnome.org>
Sat, 7 May 2022 11:41:49 +0000 (12:41 +0100)
committerAntónio Fernandes <antoniof@gnome.org>
Sat, 7 May 2022 17:10:44 +0000 (18:10 +0100)
commit64347f2c79d46950595e2689dd774832310742ca
tree038b9f33598fa63389c31563c9bd5693502e3aec
parentaa4e8334ee9a76c14ee5fb43748d2de53f16ebe3
placessidebar: Point to row instead or reparenting popovers

In GTK 3 we used to move the popovers around using set_relative_to();
this is gone in GTK 4 and the apparent direct replacement is setting
the target widget as the new parent.

But this requires a lot of careful handling least the popover become
orphan, which gets us ready to crash at any moment.

Since we only care about positioning the popovers relative to a row,
let's use the set_pointing_to() instead of reparenting. Now, the
sidebar is always the parent.
gtk/gtkplacessidebar.c